package demo;

class Shape {
    public void draw() {
        System.out.println("画画");
    }
}
class Rectangle extends Shape {
    @Override
    public void draw() {
        System.out.println("矩形");
    }
}
class Cycle extends Shape {
    @Override
    public void draw() {
        System.out.println("圆形");
    }
}
class Flower extends Shape {
    @Override
    public void draw() {
        System.out.println("花花");
    }
}
public class Test {
    public static void drawMap(Shape shape) {
        shape.draw();
    }
    public static void main(String[] args) {
        Rectangle rectangle = new Rectangle();
        Cycle cycle = new Cycle();
        Flower flower = new Flower();

        drawMap(rectangle);
        drawMap(cycle);
        drawMap(flower);
    }
}
